import { RouteRecordRaw } from 'vue-router';

// 布局组件
const Layout = () => import(/* webpackChunkName: "layout" */ '@/layout/index.vue');

const Login = () => import(/* webpackChunkName: "login" */ '@/view/common/login/index.vue');
const Forget = () => import(/* webpackChunkName: "login" */ '@/view/common/forgetPassword/index.vue');
const AuthCallback = () => import(/* webpackChunkName: "login" */ '@/view/common/callback/weiwork/auth/index.vue');
const InstallCallback = () =>
    import(/* webpackChunkName: "login" */ '@/view/common/callback/weiwork/install/index.vue');
const InstallStep1 = () =>
    import(/* webpackChunkName: "login" */ '@/view/common/callback/weiwork/install/step1/index.vue');
const Agreement = () => import(/* webpackChunkName: "login" */ '@/view/common/agreement/index.vue');
const Register = () => import(/* webpackChunkName: "register" */ '@/view/common/register/index.vue');
const ForgetPassword = () => import(/* webpackChunkName: "forgetPassword" */ '@/view/common/forgetPassword/index.vue');
const Home = () => import(/* webpackChunkName: "home" */ '@/view/home/index.vue');
const SelectFirm = () => import(/* webpackChunkName: "selectFirm" */ '@/view/common/selectFirm/index.vue');
const AuthorizationGuide = () =>
    import(/* webpackChunkName: "guideConfig" */ '@/view/channelconfig/guideConfig/index.vue');
const CustomeGuide = () =>
    import(/* webpackChunkName: "guideConfig" */ '@/view/channelconfig/customerConfig/index.vue');
const MessageGuide = () =>
    import(/* webpackChunkName: "guideConfig" */ '@/view/channelconfig/qywechat/messagesave/messageConfig/index.vue');
const SCRMGuide = () => import(/* webpackChunkName: "guideConfig" */ '@/view/appmarket/authorizationConfig/index.vue');
const MerchantconfigGuide = () =>
    import(
        /* webpackChunkName: "guideConfig" */ '@/view/channelconfig/qywechat/enterprisepayment/merchantconfig/index.vue'
    );
const SecretkeyconfigGuide = () =>
    import(
        /* webpackChunkName: "guideConfig" */ '@/view/channelconfig/qywechat/enterprisepayment/secretkeyconfig/index.vue'
    );
const CertificateconfigGuide = () =>
    import(
        /* webpackChunkName: "guideConfig" */ '@/view/channelconfig/qywechat/enterprisepayment/certificateconfig/index.vue'
    );
const EnterpriseconfigGuide = () =>
    import(
        /* webpackChunkName: "guideConfig" */ '@/view/channelconfig/qywechat/enterprisepayment/enterpriseconfig/index.vue'
    );
const SerialNumber = () =>
    import(
        /* webpackChunkName: "guideConfig" */ '@/view/channelconfig/qywechat/enterprisepayment/serialconfig/index.vue'
    );
const AssociatedApplet = () => import(/* webpackChunkName: "guideConfig" */ '@/view/channelconfig/miniApp/index.vue');
const PerfectInfo = () =>
    import(/* webpackChunkName: "guideConfig" */ '@/view/channelconfig/qywechat/marketingApplet/guide/perfectInfo.vue');
const MiniAppRedirectInfo = () =>
    import(/* webpackChunkName: "guideConfig" */ '@/view/channelconfig/qywechat/marketingApplet/guide/redirect.vue');
const WxVideoShopInfo = () =>
    import(
        /* webpackChunkName: "guideConfig" */ '@/view/ecommerce/storeManage/list/addVideoNumberStore/videoStoreInfo/index.vue'
    );
// 如何查看视频号小店id页面
const LookVideoNum = () =>
    import(
        /* webpackChunkName: "guideConfig" */ '@/view/ecommerce/storeManage/list/addVideoNumberStore/LookViedoNum.vue'
    );

const maoTaoGuide = () =>
    import(/* webpackChunkName: "guideConfig" */ '@/view/ecommerce/storeManage/list/storeGuide/maoTao.vue');
/**如何获取快手id */
const kuaishouIdGuide = () =>
    import(/* webpackChunkName: "guideConfig" */ '@/view/ecommerce/storeManage/list/storeGuide/kuaiShou.vue');
const KuaishouStore = () =>
    import(
        /* webpackChunkName: "guideConfig" */ '@/view/ecommerce/storeManage/list/addKuaiShouStore/kuaishouSrore.vue'
    );
const yzMemberPassOperationalGuideline = () =>
    import(
        /* webpackChunkName: "guideConfig" */ '@/view/ecommerce/storeManage/list/yzMemberPassOperationalGuideline/index.vue'
    ); // 有赞会员通操作指引
const routes: Array<RouteRecordRaw> = [
    { name: 'login', path: '/login', component: Login, meta: { title: '登录' } },
    { name: 'forget', path: '/forget', component: Forget, meta: { title: '忘记密码' } },
    { name: 'authcallback', path: '/callback/weiwork/auth', component: AuthCallback, meta: { title: '登录鉴权' } },
    { name: 'installstep1', path: '/install/step1', component: InstallStep1, meta: { title: '授权配置' } },
    {
        name: 'installcallback',
        path: '/callback/weiwork/install/:suiteid',
        component: InstallCallback,
        meta: { title: '登录鉴权' }
    },
    { name: 'platform', path: '/agreement', component: Agreement, meta: { title: '用户协议' } },
    { name: 'register', path: '/register', component: Register, meta: { title: '注册' } },
    { name: 'forgetPassword', path: '/forgetPassword', component: ForgetPassword, meta: { title: '忘记密码' } },
    { name: 'selectFirm', path: '/selectFirm', component: SelectFirm, meta: { title: '选择登录账号' } },
    {
        name: 'authorizationGuide',
        path: '/authorization-guide',
        component: AuthorizationGuide,
        meta: { title: '企业通讯录配置引导' }
    },
    { name: 'customerGuide', path: '/customer-guide', component: CustomeGuide, meta: { title: '客户联系配置引导' } },
    { name: 'messageGuide', path: '/message-guide', component: MessageGuide, meta: { title: '会话存档配置引导' } },
    { name: 'scrmGuide', path: '/scrm-guide', component: SCRMGuide, meta: { title: '客易达SCRM配置引导' } },
    { name: 'maoTaoGuide', path: '/mao-tao-guide', component: maoTaoGuide, meta: { title: '天猫/淘宝引导' } },
    {
        name: 'kuaishouGuide',
        path: '/kuaishou-id-guide',
        component: kuaishouIdGuide,
        meta: { title: '获取快手id引导' }
    },
    {
        name: 'merchantconfigGuide',
        path: '/merchantconfig-guide',
        component: MerchantconfigGuide,
        meta: { title: '商户号配置引导' }
    },
    {
        name: 'secretkeyconfigGuide',
        path: '/secretkeyconfig-guide',
        component: SecretkeyconfigGuide,
        meta: { title: '支付密钥配置引导' }
    },
    {
        name: 'certificateconfigGuide',
        path: '/certificateconfig-guide',
        component: CertificateconfigGuide,
        meta: { title: '支付证书下载引导' }
    },
    {
        name: 'enterpriseconfigGuide',
        path: '/enterpriseconfig-guide',
        component: EnterpriseconfigGuide,
        meta: { title: '企业ID配置引导' }
    },
    { name: 'serialNumber', path: '/serial-number', component: SerialNumber, meta: { title: '序列号配置引导' } },
    {
        name: 'associatedApplet',
        path: '/associated-applet',
        component: AssociatedApplet,
        meta: { title: '如何关联小程序' }
    },
    { name: 'perfectInfo', path: '/perfect-info-guide', component: PerfectInfo, meta: { title: '完善小程序基本信息' } },
    {
        name: 'miniAppRedirect',
        path: '/redirect-info-guide',
        component: MiniAppRedirectInfo,
        meta: { title: '小程序' }
    },
    { name: 'kuaishouStore', path: '/kuaishou-store', component: KuaishouStore, meta: { title: '如何获取快手小店' } },
    {
        name: 'wxVideoShopInfo',
        path: '/wx-video-shop-info',
        component: WxVideoShopInfo,
        meta: { title: '视频号小店信息' }
    },
    {
        name: 'LookVideoNum',
        path: '/look-viedo-num',
        component: LookVideoNum,
        meta: { title: '如何查看视频号小店ID' }
    },
    { name: 'kuaishouStore', path: '/kuaishou-store', component: KuaishouStore, meta: { title: '如何获取快手小店' } },
    {
        name: 'yzMemberPassOperationalGuideline',
        path: '/yz-member-pass-operational-guideline',
        component: yzMemberPassOperationalGuideline,
        meta: { title: '操作指引' }
    },
    {
        name: 'root',
        path: '/',
        component: Layout,
        redirect: '/home',
        children: [
            { name: 'home', path: '/home', component: Home, meta: { title: '首页', rootMenuId: 1, hidden: true } }
        ]
    }
];

export default routes;
